MUITextCreateΒΆ
MUITextCreate, hWndParent:MUIWND, lpszText:LPSTR, X:MUIVALUE, Y:MUIVALUE, nWidth:MUIVALUE, nHeight:MUIVALUE, ResourceID:RESID, Style:MUIVALUE
Creates a new ModernUI_Text control.
Parameters
- [in] hWndParent - parent window of control
- [in] lpszText - text to display
- [in] X - x coord of control
- [in] Y - y coord of control
- [in] nWidth - width of control
- [in] nHeight - height of control
- [in] ResourceID - resource id of control
- [in] Style - can be combination of style flags, see ModernUI_Text Style Flags for details
Return
Returns handle to newly created ModernUI_Text control (MUIWND
) if successful, or NULL
otherwise
ModernUI_Text Style Flags
The following combination of flags can be specified for Style:
Font size style flags (a single flag from this group):
MUITS_7PT
- 7ptMUITS_8PT
- 8ptMUITS_9PT
- 9ptMUITS_10PT
- 10ptMUITS_11PT
- 11ptMUITS_12PT
- 12ptMUITS_13PT
- 13ptMUITS_14PT
- 14ptMUITS_15PT
- 15ptMUITS_16PT
- 16ptMUITS_18PT
- 18ptMUITS_20PT
- 20ptMUITS_22PT
- 22ptMUITS_24PT
- 24ptMUITS_28PT
- 28ptMUITS_32PT
- 32pt
Font familty style flags (a single flag from this group):
MUITS_FONT_DIALOG
- Use font that dialog is usingMUITS_FONT_SEGOE
- Segoe UI fontMUITS_FONT_TAHOMA
- Tahoma fontMUITS_FONT_ARIAL
- Arial fontMUITS_FONT_TIMES
- Times New Roman fontMUITS_FONT_COURIER
- Courier New fontMUITS_FONT_VERDANA
- Verdana font
Text alignment style flags (a single flag from this group):
MUITS_ALIGN_LEFT
- left align textMUITS_ALIGN_RIGHT
- right align textMUITS_ALIGN_CENTER
- center textMUITS_ALIGN_JUSTIFY
- justify text
Font special style flags (combination of flags allowed):
MUITS_FONT_NORMAL
- No bold, italic or underlineMUITS_FONT_BOLD
- Bold textMUITS_FONT_ITALIC
- Italic textMUITS_FONT_UNDERLINE
- Underline text
Misc options style flags (combination of flags allowed):
MUITS_SINGLELINE
- Single line of text, otherwise is multi lineMUITS_HAND
- Show a hand instead of an arrow when mouse moves over textMUITS_LORUMIPSUM
- Show lorum ipsum in text box - for demo purposes etcMUITS_UTF8
- Text is utf8 formatMUITS_HTMLCODE
- Text has htmlcode tags to decodeMUITS_BBCODE
- Text has bbcode tags to decode
Example
LOCAL TextStyle:DWORD
mov TextStyle, MUITS_22PT or MUITS_FONT_SEGOE or MUITS_ALIGN_LEFT or MUITS_FONT_BOLD
Invoke MUITextCreate, hWin, Addr szText, 10, 10, 400, 400, IDC_TXT1, TextStyle
See Also